module.exports = function (grunt) {
    'use strict';

    var projectName = 'minisite creator';

    grunt.initConfig({
        clean: {
            debug: {
                files: [{
                    src: ['./dest/*']
                }]
            }
        },
		connect: {
            server: {
                options: {
                    port: 3000,
                    base: './'
                }
            }
        },
        watch: {
            livereload: {
                options: {
                    livereload: true
                },
                files: [
                    './css/*',
                    './js/*',
                    './images/*',
                    '*.html'
                ]
            },
            emberTemplates: {
                files: './templates/**/*.hbs',
                tasks: ['emberTemplates']
            }
        },
        copy: {
            debug: {
                files: [
                    {
                        cwd: './',
                        src: ['*.html','styles/*.css','images/*','js/*','js/**','pages/*.html','includes/*'],
                        dest: './dest/',
                        expand: true
                    }
                ]
            }
        },
        emberTemplates: {
            compile: {
                options: {
                    amd: false,
                    templateBasePath: /\.\/templates\//
                },
                files: {
                    './js/templates.js': './templates/**/*.hbs'
                }
            }
        }
    });

    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-contrib-connect');
    grunt.loadNpmTasks('grunt-contrib-copy');
    grunt.loadNpmTasks('grunt-preprocess');
    grunt.loadNpmTasks('grunt-ember-templates');
    grunt.loadNpmTasks('grunt-contrib-clean');
	grunt.loadNpmTasks('grunt-contrib-connect');

    grunt.registerTask('default', [
        'emberTemplates',
		'connect',
        'watch'
    ]);
};